Skip to content

fix: load runtime data using importlib.resources.files#216

Merged
sbillinge merged 3 commits intodiffpy:mainfrom
cadenmyers13:load-data
Mar 3, 2026
Merged

fix: load runtime data using importlib.resources.files#216
sbillinge merged 3 commits intodiffpy:mainfrom
cadenmyers13:load-data

Conversation

@cadenmyers13
Copy link
Contributor

@cadenmyers13 cadenmyers13 commented Mar 3, 2026

closes #211

As recommended on that issue ^

@cadenmyers13
Copy link
Contributor Author

@sbillinge ready for review

@sbillinge
Copy link
Contributor

This is good to know... How will we remember this again in the future? I wonder if we could write a short FAQ in scikit-package that summarizes what we did here (data in a dir outside src but packaged with the sdist and the wheel - as long as it is needed at runtime and is small) then how to update the pyproject.toml and manifest and imports to make it all work.....

@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.13%. Comparing base (d016b99) to head (19dfb62).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #216   +/-   ##
=======================================
  Coverage   99.13%   99.13%           
=======================================
  Files           5        5           
  Lines         345      345           
=======================================
  Hits          342      342           
  Misses          3        3           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sbillinge sbillinge merged commit 65f2cf2 into diffpy:main Mar 3, 2026
5 checks passed
@sbillinge
Copy link
Contributor

@cadenmyers13 do we want to do an rc release to see if this package builds correctly?

@cadenmyers13
Copy link
Contributor Author

I wonder if we could write a short FAQ in scikit-package that summarizes what we did here (data in a dir outside src but packaged with the sdist and the wheel - as long as it is needed at runtime and is small)

@sbillinge I created an issue to do this in scikit-package. PS the data is inside src/ which is recommended

do we want to do an rc release to see if this package builds correctly?

Yeah lets do it.

@sbillinge
Copy link
Contributor

I pushed out 0.3.0-rc.0. Please do a pip install diffpy.labpdfproc==0.3.0-rc.0 in a new env and test everything out (assuming it goes all the way out)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: data being shipped in MANIFEST.in

2 participants